<div class="box white_bg">
<!--<div class="chitiet_bar">
<div class="chitiet_bar_left"></div>
<div class="chitiet_bar_right">
<? if ($this->viewParams['nodeTypeInfo']['type'] == "news") :?>
<?=t(166)?>
<?else :?>
<?=$this->viewParams['nodeTypeInfo']['type'] ?>
<?endif ?>
</div>
</div>-->
<?
		$sess = new Zend_Session_Namespace(CLU_NS);
		if ((isset($sess->userId) && (strpos($sess->userPermissions, 'administer everything ')
			/*(strpos($sess->userPermissions, 'update ' . $this->viewParams['nodeTypeInfo']['type'])*/ ||
			($sess->userId == $this->viewParams['node']['poster_id'] && strpos ($sess->userPermissions, 'update own ' . $this->viewParams['nodeTypeInfo']['type'])
			))))
:?>
 <div style="text-align:right">
 	<a href="<?=$this->hvnUrl(array('module' => 'node',
 	                                'controller' => 'master',
 	                                'type' => $this->viewParams['nodeTypeInfo']['type'],
 	                                'action' => 'edit') ,
 	                                'node');?>?id=<?=$this->viewParams['node']['id']?>" > <?=t(38)?> </a> | 
 	
 	<?if ((isset($sess->userId) && (strpos($sess->userPermissions, 'administer everything') ||
                   ($sess->userId == $this->viewParams['node']['poster_id'] && strpos ($sess->userPermissions, 'delete own blog')
                        )))):
             ?>
    	<a href="javascript:void()" name="item-delete-blog-<?=$this->viewParams['node']['id']?>"><?=t(31)?></a>
     <?endif?>
     
 	<?if ($this->viewParams['nodeTypeInfo']['needs_translation']) :?>
 	<a href="<?=$this->hvnUrl(array('module' => 'article',
 	                                'controller' => 'master',
 	                                'action' => 'translate') ,
 	                                'nocontroller');?>?id=<?=$this->viewParams['node']['article_id']?>" > <?=t(90)?> </a>
 	<?endif ?>
 </div>
 <?endif ?>
<!-- 
<div class="blog_right_title" align="center">
	<ul>
		<li><a class="curent" href="#"><?=t(5008)?></a></li>
		<li><a href="#"><?=t(5009)?></a></li>
		<li><a href="#"><?=t(5010)?></a></li>
	</ul>
</div>
 -->

<!-- NEW -->
  <div class="box">
	<div class="chitiet_title">&nbsp;&nbsp;
		<? if ($this->viewParams['nodeTypeInfo']['has_title']) :?>
	     <a href="#">
	     	<?if (isset($this->viewParams['nodeTypeInfo']['requires_translation']) && $sess->viewLang != get_language_from_int($this->viewParams['node']['language'])) :?>
				<?=$this->viewParams['article']['article_title'] ?>
				<?else:?>
				<?=$this->viewParams['node']['title'] ?>
			<?endif ?> 
	     </a>
		<?endif ?>
	 </div>
	<!-- <div class="chitiet_img">
	 	<? if ($this->viewParams['nodeTypeInfo']['has_thumb'])
        		$imageUrl = str_replace("/original/", "/medium/", $this->viewParams['node']['thumb']);
           else
        		$imageUrl = "/public/themes/hard/images/img-news.jpg";
        ?>
	 	<img src="<?=$imageUrl?>" align="absmiddle">
	 </div> -->
	 <div class="text">
		 	<? if ($this->viewParams['nodeTypeInfo']['has_body']) :?>
				<?if (isset($this->viewParams['nodeTypeInfo']['requires_translation']) && $sess->viewLang != get_language_from_int($this->viewParams['node']['language'])) :?>
				<?=$this->viewParams['article']['article_body'] ?>
				<?else:?>
				<?=$this->viewParams['node']['body'] ?>
				<?endif ?> 
			<?endif ?>
	 </div>
	 <div class="chitiet_case">
	<?=t(136)?> : <a href="<?=$this->hvnUrl(array('action'=>'view'),'account')?>?id=<?=$this->viewParams['node']['poster_id']?>"> <?=$this->viewParams['node']['metadata']['poster_name']?> </a>, <?=t(3007)?> <?=date("j/n/Y", $this->viewParams['node']['created']) ?>
	</div>
	<script type="text/javascript">
		var oriLang = '<?= get_language_from_int($this->viewParams['node']['language'])?>';
		var lang = '<?= $sess->viewLang?>';
	    googleTranslate(oriLang, lang, 'chitiet_title', 'text');
	</script>
  <div class="clear"></div>

   <table width="742" border="0" cellspacing="0" cellpadding="0">
	  <tr>
	    <td width="519" height="54">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	    <? if (isset($this->viewParams['node_back'][0]['id'])) :?>
	    <a href="<?=$this->hvnUrl(array('type' => 'blog', 'action' => 'view'), 'node')?>?id=<?=$this->viewParams['node_back'][0]['id']?>">
	    <img src="/public/themes/hard/images/blog_chudetruoc.jpg" align="absmiddle" />
	    </a>
	    <?endif?>
	    &nbsp;&nbsp;&nbsp;
	    <? if (isset($this->viewParams['node_next'][0]['id'])) :?>
	    <a href="<?=$this->hvnUrl(array('type' => 'blog', 'action' => 'view'), 'node')?>?id=<?=$this->viewParams['node_next'][0]['id']?>">
	    <img src="/public/themes/hard/images/blog_chudesau.jpg" align="absmiddle" />
	    </a>
	    <?endif?>
	    </td>
	    <td width="223"><img src="/public/themes/hard/images/blog_print.jpg" align="absmiddle" /><a href="#"> <?=t(5001)?></a> &nbsp;&nbsp;&nbsp;<img src="/public/themes/hard/images/blog_email.jpg" align="absmiddle" /> <a href="#"><?=t(156)?></a></td>
	  </tr>
	</table>
	<div class="clear"></div>
	
  </div>
  </div>
<script type="text/javascript">
	$(function(){
		$("[name^=item-delete-]").click(function(e){
		var del=confirm("Do you want to delete this item?");
		deleteId = this.name.split('-')[3];
		type = this.name.split('-')[2];
		messeage = '';
		if (del){	
				$.getJSON("/<?=$sess->viewLang?>/node/ajax/delete-node", {'id': deleteId,'type':type},function(json) {
					if(json.success)	
						window.location.href = "/<?=$sess->viewLang?>/node/blog/blog-home";
	               	else
	               		$(".mouse_action-"  + deleteId).show().html("<?=t(729)?>");
	               return false;
				});
		}else
			return false;
	});

	});
</script>